package com.oocl.client.ui;

import java.awt.LayoutManager;

import javax.swing.JFrame;

import com.oocl.client.callback.ProtocolFinishProcessCallback;
import com.oocl.client.process.ProtocolReceiver;
import com.oocl.client.process.ProtocolSender;
import com.oocl.qq.protocol.Protocol;

/**
 * 窗口 基类
 * 预设生命周期方法
 * @author androidjp
 *
 */
public abstract class BaseFrame extends JFrame{
	
	public BaseFrame(){
		this.initFrame();
		this.init();
		this.addEvent();
	
		this.setVisible(true);
	}

	///初始化JFrame自身
	protected abstract void initFrame();
	///初始化子控件
	protected abstract void init();

	//为子控件添加监听事件
	protected abstract void addEvent();

	protected abstract void sendProtocol(Protocol protocol);
}
